#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n = 0,k = 0;
    cin >> n >> k;
    vector<long long> a_v(n,0),b_v(n,0);
    for(int i = 0;i < n;++i)
    {
        cin >> a_v[i];
    }
    for(int i = 0;i < n;++i)
    {
        cin >> b_v[i];
    }
    //滑动窗口
    size_t sum_a = 0,sum_b = 0;
    size_t res = 0;
    size_t front = 0,back = 0;
    size_t maxSum_a = 0,Sum_b = 0;
    while(back < n)
    {
        sum_a += a_v[back];
        sum_b += b_v[back];
        while(back - front + 1 > k)
        {
            sum_a -= a_v[front];
            sum_b -= b_v[front];
            ++front;
        }
        if(back - front + 1 == k)
        {
            if(maxSum_a < sum_a){
                res = front;
                maxSum_a = sum_a;
                Sum_b = sum_b;
            }
            else if(maxSum_a == sum_a && Sum_b > sum_b){
                res = front;
                Sum_b = sum_b;
            }
        }
        ++back;
    }
    cout << res+1; //注意题目的输出依据！
    return 0;
}